<template>
	<ucs-svg :width="size" :height="size" :src="iconSvg" />
</template>
<script setup lang="uts">
	/**
	 * @description 《苹果电脑iMac》图标
	 * @tutorial https://ucs.cloudsimpler.com/library/ucs-iconPark
	 * @property {Number} size 图标大小
	 * @property {Number} strokeWidth 线段粗细
	 * @property {String} theme 图标大小
	 * @property {Array<string>} fill 图标颜色，["外部描边颜色","外部填充颜色","内部描边颜色","内部填充颜色"]
	 * @property {String} strokeLinecap 图标大小
	 * @property {String} strokeLinejoin 图标大小
	 */
	import { colors, IiconParkProps } from "../../mixins/iconParkMixin.uts";
	import { computed } from "vue";
	
	const props = withDefaults(defineProps<IiconParkProps>(), {
		size: 24,
		strokeWidth: 4,
		theme: 'outline',
		fill: ["#000000"],
		strokeLinecap: 'round',
		strokeLinejoin: 'round'
	});

	const iconSvg = computed(() : string => {
		return `<?xml version="1.0" encoding="UTF-8"?><svg width="${props.size}" height="${props.size}" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6H44V28H4V6Z" fill="${colors(props.theme, props.fill, 1)}" stroke="${colors(props.theme, props.fill, 0)}" stroke-width="${props.strokeWidth}" stroke-linejoin="${props.strokeLinejoin}"/><path d="M44 28V36H4V28" stroke="${colors(props.theme, props.fill, 0)}" stroke-width="${props.strokeWidth}" stroke-linecap="${props.strokeLinecap}" stroke-linejoin="${props.strokeLinejoin}"/><path d="M13.0909 18H10.9091C10.407 18 10 18.407 10 18.9091V21.0909C10 21.593 10.407 22 10.9091 22H13.0909C13.593 22 14 21.593 14 21.0909V18.9091C14 18.407 13.593 18 13.0909 18Z" fill="${colors(props.theme, props.fill, 2)}"/><path d="M13.0909 12H10.9091C10.407 12 10 12.407 10 12.9091V15.0909C10 15.593 10.407 16 10.9091 16H13.0909C13.593 16 14 15.593 14 15.0909V12.9091C14 12.407 13.593 12 13.0909 12Z" fill="${colors(props.theme, props.fill, 2)}"/><path d="M21.0909 18H18.9091C18.407 18 18 18.407 18 18.9091V21.0909C18 21.593 18.407 22 18.9091 22H21.0909C21.593 22 22 21.593 22 21.0909V18.9091C22 18.407 21.593 18 21.0909 18Z" fill="${colors(props.theme, props.fill, 2)}"/><path d="M21.0909 12H18.9091C18.407 12 18 12.407 18 12.9091V15.0909C18 15.593 18.407 16 18.9091 16H21.0909C21.593 16 22 15.593 22 15.0909V12.9091C22 12.407 21.593 12 21.0909 12Z" fill="${colors(props.theme, props.fill, 2)}"/><path d="M29.0909 18H26.9091C26.407 18 26 18.407 26 18.9091V21.0909C26 21.593 26.407 22 26.9091 22H29.0909C29.593 22 30 21.593 30 21.0909V18.9091C30 18.407 29.593 18 29.0909 18Z" fill="${colors(props.theme, props.fill, 2)}"/><path d="M29.0909 12H26.9091C26.407 12 26 12.407 26 12.9091V15.0909C26 15.593 26.407 16 26.9091 16H29.0909C29.593 16 30 15.593 30 15.0909V12.9091C30 12.407 29.593 12 29.0909 12Z" fill="${colors(props.theme, props.fill, 2)}"/><path d="M37.0909 12H34.9091C34.407 12 34 12.407 34 12.9091V15.0909C34 15.593 34.407 16 34.9091 16H37.0909C37.593 16 38 15.593 38 15.0909V12.9091C38 12.407 37.593 12 37.0909 12Z" fill="${colors(props.theme, props.fill, 2)}"/><path d="M20.8462 36L16 42H32L27.1538 36" stroke="${colors(props.theme, props.fill, 0)}" stroke-width="${props.strokeWidth}" stroke-linecap="${props.strokeLinecap}" stroke-linejoin="${props.strokeLinejoin}"/></svg>`
	});
</script>